<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/vue.js"></script>
</head>
<body>
<div id="app">
    <!--修饰符 lazy   按回车或者失去焦点才实现双向数据绑定-->
    <input type="text" v-model.lazy="message">
    <h1>{{message}}</h1>
    <!--修饰符 number   其他类型转为数字类型-->
    <input type="number" v-model.number="age">
    <h1>{{age}}---{{typeof age}}</h1>
    <!--修饰符 trim   去掉空格-->
    <input type="text" v-model.trim="age">
    <h1>{{age}}</h1>
</div>
<script>
    let app = new Vue({
        el:'#app',
        data:{
            message: 'Hello World',
            age:''
        }
    })
</script>
</body>
</html>
